#include<stdio.h>
#include<conio.h>
//#include<math.h>
void main()
{
	float cp, sp,profit, loss;
	clrscr();

	printf("\n\n\n\t\tEnter the value of CP: ");
	scanf("\n\n\n\t\t%f", &cp);

	printf("\n\n\n\t\tEnter the value of sp: ");
	scanf("\n\n\n\t\t%f", &sp);

	profit = sp - cp;
	loss   = cp - sp;

	if(sp>cp)

		printf("\n\n\n\t\tprofit = %f", profit);
	else
		printf("\n\n\n\t\tloss = %f", loss);

	getch();

}
